{% include 'front/header.html' %}
<link rel="stylesheet" href="/resource/front/css/mobile/y-login.css" />
<script type="text/javascript" src="/resource/front/css/mobile/size.js"></script>
<script>
	function setFont() {
		var HTML = document.getElementsByTagName('html')[0];
		/*var dpr=1;//像素比
		var Size=document.documentElement.clientWidth*dpr/10;*/
		//把viewport视口分成10份的rem,html的font-size为1rem
		var Size = document.documentElement.clientWidth / 10;
		if(Size >= 60) {
			Size = 60
		}
		HTML.style.fontSize = Size + 'px';
	};
	setFont(); //初始适配
	window.onresize = function() { //窗口大小改变适配
		setFont();
	};
</script>

<body>
	<div class="wallet-wrap" style="max-width: 600px; height: 100%; margin:0 auto ;position: relative;background: #fff !important;">
		<div class="wallet-header">
			<p class="wa-o">
				<span>总收入：</span>
				<span id="all_money">
                	
                </span> LCB
			</p>
			<p class="wa-b">
				<span>余额：</span>
				<span id="earn" eran>
                	
                </span> LCB
			</p>
		</div>
		<div>
			<p class="y-font">下载合作应用钱包可立即提现</p>
			<div class="ul-wrap">
				<ul>
					<li>
						<a href="http://zhichi_test.52qingqiyun.com/Public/App/download.html"><img src="/resource/front/images/forward/lclogo.png" alt=""></a>
						<div>龙采校园</div>
					</li>
					<li>
						<img src="/resource/front/images/forward/logo1.png" alt="" id="loadCarmaer">
						<div>HYH区块链</div>
					</li>
					<li>
						<img src="/resource/front/images/forward/logo1.png" alt="">
						<div>HYH区块链</div>
					</li>
					<li>
						<img src="/resource/front/images/forward/logo1.png" alt="">
						<div>HYH区块链</div>
					</li>
					<li>
						<img src="/resource/front/images/forward/logo1.png" alt="">
						<div>HYH区块链</div>
					</li>
					<li>
						<img src="/resource/front/images/forward/logo1.png" alt="">
						<div>HYH区块链</div>
					</li>

				</ul>

			</div>

		</div>

	</div>

</body>
<script type="text/javascript" src="/resource/front/js/jquery.min.js"></script>
<script type="text/javascript" src="/resource/front/css/mobile/mui.js"></script>
<script src="https://res.wx.qq.com/open/js/jweixin-1.0.0.js"></script>
<script type="text/javascript" src="/resource/front/css/mobile/jQuery.md5.js"></script>
<script type="text/javascript" src="/resource/front/css/mobile/ykp.js"></script>

<script type="text/javascript">
	mui.ready(function() {
		if(!ykp.getLocalStorage('userInfo')) {
			window.location.href = 'login';
		}
		console.log(wx)
		this.initShare();
	})

	function initShare() {
		var that = this;
		ykp.doAjax({
			url: "/api/wxshare/wx_config",
			method: "post",
			data: {
				type: "config",
				url: window.location.href
			},
			success: function(res) {
				wx.config({
					debug: false, // 开启调试模式,调用的所有api的返回值会在客户端alert出来，若要查看传入的参数，可以在pc端打开，参数信息会通过log打出，仅在pc端时才会打印。
					appId: res.data.appid, // 必填，公众号的唯一标识
					timestamp: res.data.timestamp, // 必填，生成签名的时间戳
					nonceStr: res.data.nonceStr, // 必填，生成签名的随机串
					signature: res.data.signature, // 必填，签名，见附录1
					jsApiList: [
						"onMenuShareTimeline", "onMenuShareAppMessage"
					] // 必填，需要使用的JS接口列表，所有JS接口列表见附录2
				});

				wx.checkJsApi({
					jsApiList: ['onMenuShareTimeline', 'onMenuShareAppMessage'], // 需要检测的JS接口列表，所有JS接口列表见附录2,
					success: function(res) {
						console.log(res)
						// 以键值对的形式返回，可用的api值true，不可用为false
						// 如：{"checkResult":{"chooseImage":true},"errMsg":"checkJsApi:ok"}
					}
				});
				that.wxReady(res.data.url);
			}
		})
	}

	function wxReady() {
		$('#loadCarmaer').click(function(){
			console.log(1)
			wx.chooseImage({
				count: 1, // 默认9
				sizeType: ['original', 'compressed'], // 可以指定是原图还是压缩图，默认二者都有
				sourceType: ['album', 'camera'], // 可以指定来源是相册还是相机，默认二者都有
				success: function(res) {
					var localIds = res.localIds; // 返回选定照片的本地ID列表，localId可以作为img标签的src属性显示图片
					console.log(localIds)
				}
			});
		})
		
	}
</script>

</html>